﻿using SqlSugar;

namespace WechatH5Auth.RazorWebUI;

public class SqlSugarHelper
{
	public static SqlSugarScope db = new SqlSugarScope(new ConnectionConfig()
	{
		ConnectionString = "DataSource=./WechatH5Auth.db",//连接符字串
		DbType = DbType.Sqlite,//数据库类型
		IsAutoCloseConnection = true //不设成true要手动close
	},
	 db =>
	 {
		 //调试SQL事件，可以删掉
		 db.Aop.OnLogExecuting = (sql, pars) =>
		 {
			 Console.WriteLine(sql);//输出sql,查看执行sql 性能无影响
		 };
	 });
}
